package cn.jinhaze.entity;

import cn.jinhaze.constant.SexConstant;
import cn.jinhaze.enums.Course;

import java.util.Map;
import java.util.Set;

/**
 * 学生类
 *
 * @author LiZhiHan
 * @date 2025/2/20
 */
public class Student {


	/**
	 * 学号 id
	 */
	private Long id;

	/**
	 * 学生姓名
	 */
	private String name;

	/**
	 * 性别 1-女 2-男
	 */
	private Integer sex;

	/**
	 * 班级id
	 */
	private Long clazzId;

	/**
	 * 参与课程
	 */
	private Set<Course> courses;

	public Student(Long id, String name, Integer sex, Long clazzId, Set<Course> courses) {
		this.id = id;
		this.name = name;
		this.sex = sex;
		this.clazzId = clazzId;
		this.courses = courses;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Long getClazzId() {
		return clazzId;
	}

	public void setClazzId(Long clazzId) {
		this.clazzId = clazzId;
	}

	public Set<Course> getCourses() {
		return courses;
	}

	public void setCourses(Set<Course> courses) {
		this.courses = courses;
	}

	public Integer getSex() {
		return sex;
	}

	public void setSex(Integer sex) {
		this.sex = sex;
	}

	@Override
	public String toString() {
		return "学号:" + id + ", 姓名:'" + name + ", 性别:" + SexConstant.getSexName(sex) + ", 班级id:" + clazzId + ", 课程列表:" + courses + '}';
	}
}
